<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Hello ThymeLeaf</title>
    <style type="text/css">
        #empTable{
            width: 80%;
            border: 1px solid blue;
            margin: 0px auto;
        }
        #empTable th,td{
            border: 1px solid green;
            text-align: center;
        }
    </style>
</head>
<body>
Hello ThymeLeaf
<span th:text="modelAndView"></span>
<span th:text="${msg}"></span>
<span th:if="${deptList} != null">
    55555

</span>
<table>
    <tr>
        <th>索引</th>
        <th>编号</th>
        <th>名称</th>
        <th>地址</th>
    </tr>
    <tr th:each="dept,i:${deptList}">
        <td th:text="${i.index}"></td>
        <td th:text="${i.deptno}"></td>
        <td th:text="${i.dname}"></td>
        <td th:text="${i.loc}"></td>
    </tr>
</table>

</body>
</html>